package com.ikun.common.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @ClassName SecurityUser
 * @Description:
 * @CreateDate: 2024/4/11 14:46
 */

@ApiModel("登录用户需要返回的用户信息Vo")
@Data
@Component
public class SecurityUserInfo {

    @ApiModelProperty("id")
    private Long id;

    @ApiModelProperty("账号")
    private String username;

    @ApiModelProperty("密码")
    private String password;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("角色名")
    private List<String> roleNameList;

    @ApiModelProperty("最近登录时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime lastLoginTime;

    @ApiModelProperty("当前登录地点")
    private String ipAddr;

    @ApiModelProperty("头像")
    private String headUrl;

    @ApiModelProperty("token信息")
    private String token;

    @ApiModelProperty("认证信息")
    private String auth;

    @ApiModelProperty("登录类型 0 管理端 1 app ")
    private Integer loginType = 0;

    @ApiModelProperty("app登录验证码")
    private String code;


}
